<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    $router->resource('client', ClientController::class);
//    $router->resource('consume', ConsumeController::class);
//    $router->resource('paylog', PaylogController::class);

    $router->post('handpay', 'CommonController@addCash');//手动充值
    $router->any('clients/deduct', 'CommonController@deduct');//给每一个用户设置扣费标准
    $router->any('clients/detail/show', 'CommonController@detailShow');//返回查看资方的祥情的页面和获取数据
    $router->any('clients/contacts/open/close', 'CommonController@close_and_open_contacts');//开启还关闭资方的通讯录开关
    $router->resource('/risk/statistics', StatisticsConsumeController::class);//分控数据统计
    $router->resource('/risk/strategy', RiskController::class);//风控的策略
    $router->any('risk/save', 'RiskController@config_save');//保存初审决策
    $router->resource('supplier', SupplierController::class);//获取供应商的列表的页面
    $router->any('suppliers/list', 'SupplierController@getSuppliers');//获取供应商的数据列表
    $router->any('suppliers/add', 'SupplierController@supplieradd');//供应商的添加
    $router->any('suppliers/edit', 'SupplierController@supplieredit');//供应商的编辑

    $router->any('adminuser/list', 'AdminUserController@userlist');//供应商的编辑
    $router->get('adminuser/add', 'AdminUserController@adduser');//添加商户号的页面
    $router->post('adminuser/add', 'AdminUserController@adduser');//商户号的添加

    $router->any('adminuser/edit', 'AdminUserController@edituser');//商户号的编辑
    $router->any('adminuser/charge', 'AdminUserController@chargeuser');//商户号的充值
    $router->any('adminuser/deductfee', 'AdminUserController@deductfee');//商户号的扣费配置

    $router->resource('adminuser', AdminUserController::class);

    $router->resource('merchant/consume', ConsumeController::class);//消费的页面
    $router->resource('merchant/paylog', PaylogController::class);//充值的页面

    $router->any('consume/list', 'ConsumeController@consumelist');//获取消费的列表
    $router->any('paylog/list', 'PaylogController@payloglist');//充值的列表

    $router->resource('adminuserconfig', SettingController::class);//资方基础设置


    $router->resource('users/state/all', UserController::class);
    $router->resource('users/state/six', UserController::class);
    $router->resource('users/state/four', UserController::class);
    $router->resource('users/state/notalive', UserController::class);//未面签
    $router->resource('users/state/complete', UserController::class);//资料齐全
    
    $router->resource('orders/payrecord', OrderController::class);
    $router->resource('orders/today', OrderController::class);
    $router->resource('orders/rejudge', OrderController::class);
    $router->resource('orders/yesterday', OrderController::class);//逾期订单

    $router->resource('orders/yesterday', OrderController::class);//逾期订单
    $router->resource('orders/yesseven', OrderController::class);//7日逾期订单
    $router->resource('orders/yesfourteen', OrderController::class);//14日逾期订单
    $router->resource('orders/yestweentyone', OrderController::class);//21逾期订单
    $router->resource('orders/yesmoretweenone', OrderController::class);//21日以上逾期订单
    $router->resource('orders/repayrecord', OrderController::class);

    $router->resource('black', BlackUserController::class);//黑名单页面
    $router->get('common/black/add', 'CommonController@blackAdd');//加入黑名单

    $router->get('common/black/list', 'CommonController@blackList');//获取黑名单的一个页面的请求
    $router->post('common/black/delblack', 'CommonController@delblack');//删除一个黑名单中的用户

    $router->resource('feedbacks', FeedbackController::class);//反馈信息的显示
    $router->any('common/feedback/recall', 'CommonController@writeFeedback');//反馈信息的显示
});
